package com.yonder.gocommand.entity;

public enum UserRole {
	ADMIN("Admin"), EMPLOYEE("Employee"), CATERINGSTAFF("Catering Staff");
	private final String value;

	UserRole(String value) {
		this.value = value;
	}

	public static UserRole fromValue(String value) {
		if (value != null) {
			for (UserRole role : values()) {
				if (role.value.equalsIgnoreCase(value)) {
					return role;
				}
			}
		}
		return getDefault();
	}

	public String toValue() {
		return value;
	}

	public static UserRole getDefault() {
		return ADMIN;
	}

}
